<template>
    <div>
        <ul class="mui-table-view mui-table-view-chevron" v-for="item in emailList" :key="item.id">
            <li class="mui-table-view-cell mui-media">
                <router-link :to="'/email/'+item.id" class="mui-navigate-right">
                    <img class="mui-media-object mui-pull-left" :src="item.img">
                    <div class="mui-media-body">
                        <p class='mui-ellipsis'>{{item.email}}</p>
                        <p class='mui-ellipsis'>{{item.message}}</p>
                        <p class="tstyle">时间:{{ item.time  }}</p>
                    </div>
                </router-link>
            </li>
        </ul>
    </div>
</template>
<script>
export default {
    data() {
        return{
            emailList : []
        }
    },
    created (){
        this.getEmailL();
    },
    methods : {
        getEmailL(){
            const time = new Date();
            this.emailList = [
                { id:'1', email:'jsonxx@163.com', message : '烤炉模式的城，到黄昏，如同打翻的调色盘一般.', img : '../../images/email/tou1.jpeg', time:'20191225'},
                { id:'2', email:'xukaic@163.com', message : '静静的看这个世界，最后终于疯了.', img : '../../images/email/tou2.jpeg', time:time},
                { id:'3', email:'ranshubao@sina.com', message : '能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？', img : '../../images/email/tou3.jpeg', time: time},
                { id:'4', email:'qiulaos@163.com', message : '今天天气真好，在暖阳下伸个懒腰！！！', img : '../../images/email/tou4.jpeg', time:time},
                { id:'5', email:'ludapao@sina.com', message : '上次委托的业务有出入，有空致电再商讨。。', img : '../../images/email/tou5.jpg', time: time},
            ]
        }
    }
}
</script>
<style scoped>
li{
    height: 60px;
}
li img{
    margin-top: 7px;
}
li p{
    height: 20px;
    font-size: 10px;
}
.mui-navigate-right .mui-media-body{
    height: 60px;
}
.mui-table-view-cell>a:not(.mui-btn) {
    margin: -20px -15px;
}
.tstyle{
    color: cornflowerblue;
}
</style>